import lark from '@/config';
export class AppInfo {
  constructor() {
    this.appId = lark.env.app_id;
    this.appSecret = lark.env.app_secret;
  }
}

export default {
  state() {
    return {
      appBaseInfo: new AppInfo(),
      uuid: '', // 当前用户的访问id
    };
  },
  getters: {
    getAppInfo(state) {
      return state.appBaseInfo;
    },
    getUserUUID(state) {
      return state.uuid;
    },
  },
  mutations: {
    updateAppInfo(state, nextState) {
      const {appId, appSecret} = nextState;
      state.appBaseInfo.appId = appId;
      state.appBaseInfo.appSecret = appSecret;
    },
    updateUserUUID(state, uuid) {
      state.uuid = uuid;
    },
  },
};
